﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Globalization;
using System.Windows.Data;
using System.Windows.Markup;

namespace MOMKeLABS.Converters
{
    public class WindowStateTransparenceyConverter : IValueConverter
    {
        public object Convert(object value, System.Type targetType, object parameter, CultureInfo culture)
        {


            if ((Constants.WindowConstants.WindowState)value == Constants.WindowConstants.WindowState.Minimized)
            {
                return (double)1;
            }
            else
            {
                return (double)App.Current.Resources["MinimizedWigetOpacity"];
            }
            
        }

        public object ConvertBack(object value, System.Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException(this.GetType().ToString() + "  has no convert back function");
        }
    }
}
